
import React from "react";
import ReactECharts from "echarts-for-react";

const RadarChart = () => {
  const option = {
    title: {
      text: "企业整体能力雷达图",
      textStyle: { color: "#fff", fontSize: 16 },
      left: "center",
    },
    tooltip: {},
    radar: {
      indicator: [
        { name: "战略管理", max: 100 },
        { name: "运营能力", max: 100 },
        { name: "数字技术", max: 100 },
        { name: "人才发展", max: 100 },
        { name: "安全合规", max: 100 },
        { name: "创新能力", max: 100 },
      ],
      shape: "circle",
      radius: 80,
      splitArea: {
        areaStyle: {
          color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"],
        },
      },
      axisLine: {
        lineStyle: {
          color: "#999",
        },
      },
      splitLine: {
        lineStyle: {
          color: "#999",
        },
      },
    },
    series: [
      {
        name: "能力评分",
        type: "radar",
        data: [
          {
            value: [85, 90, 70, 80, 65, 75],
            name: "企业A",
            areaStyle: {
              color: "rgba(58,165,255,0.4)",
            },
            lineStyle: {
              color: "#3aa5ff",
            },
            symbol: "circle",
            symbolSize: 6,
          },
        ],
      },
    ],
  };

  return <ReactECharts option={option} style={{ height: 300 }} />;
};

export default RadarChart;
